package com.xc.dao;

import com.xc.pojo.UserRecharge;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface UserRechargeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserRecharge record);

    int insertSelective(UserRecharge record);

    UserRecharge selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserRecharge record);

    int updateByPrimaryKey(UserRecharge record);


    int checkInMoney(@Param("status") int status
            ,@Param("userId")Integer userId);

    UserRecharge findUserRechargeByOrderSn(String orderSn);


    List findUserChargeList(@Param("uid") Integer uid,
                            @Param("payChannel") String payChannel,
                            @Param("orderStatus") String orderStatus);

    List listByAdmin(@Param("agentId") Integer agentId
            ,@Param("userId") Integer userId
            ,@Param("realName") String realName
            ,@Param("state") Integer state
            ,@Param("begin_time") Date begin_time
            ,@Param("end_time") Date end_time);


    /**
     * 代理查询
     */
    List listByAgent(@Param("searchId") Integer searchId
            ,@Param("realName") String realName
            ,@Param("payChannel") String payChannel
            ,@Param("state") Integer state);


    BigDecimal CountChargeSumAmt(Integer chargeState);

}


